<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="pg" uri="/tags/pagination"%>
<html>
<head>
<%@ include file="../common/include/include.jsp"%>
<title>login</title>
<script type="text/javascript">
	function doQuery() {
		showBar();
		initPage("loginForm");
		chgAction("loginAction", "queryUser");
		document.forms[0].submit();
	}
</script>
</head>
<body>
	<s:form action="loginAction" method="post" name="form1" namespace="/demo">
		<s:hidden name="showList" id="showList"></s:hidden>
		<s:property value="result" />
		<input type="button" name="query" value="查询" onclick="doQuery()" />
		<s:if test="showList=='Yes'">
			<table width="100%">
				<tr style="background-color: gray;">
					<td>帐号</td>
					<td>姓名</td>
				</tr>
				<s:iterator value="userList" id="listInfo" status="st">
					<s:if test="#st.odd==true">
						<tr style="background-color: silver;">
					</s:if>
					<s:else>
						<tr style="background-color: buttonshadow;">
					</s:else>
					<td><s:property value="user_id" />
					</td>
					<td><s:property value="user_name" />
					</td>
					</tr>
				</s:iterator>
				<tr>
					<td colspan="2" align="center"><pg:pages
							curPageNo="%{loginForm.curPageNo}" total="%{loginForm.total}"
							totalRecord="%{loginForm.totalRecord}"
							styleClass="paginationSpan" method="queryUser"
							action="loginAction"></pg:pages></td>
				</tr>
			</table>
		</s:if>
		<s:include value="../common/include/pagination.jsp">
			<s:param name="formName" value="'loginForm'" />
		</s:include>
	</s:form>
</body>
</html>